package com.zwr.sheller.customer.controller;

import com.alipay.api.domain.Goods;
import com.zwr.sheller.core.common.JsonResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author: 18032
 * @Date: 15:31 2022/1/6
 */
@RestController
@RequestMapping("/summerFruit")
public class SummerFruitController {

    @PostMapping("/selectAllSummerFruit")
    @ApiOperation(value = "点击夏季水果全查询页面")
    @ApiImplicitParam(name = "id",value = "一级分类",dataType = "Long")
    public Map<String, Object> selectAllSummerFruit(Long id) {
        Goods goods = new Goods();
        goods.setGoodsId("1");
        goods.setGoodsName("菲律宾香蕉");
        goods.setGoodsPicUrl("/img/img");
        JsonResult jsonResult = new JsonResult();
        jsonResult.setField("data", goods);
        return jsonResult.getMap();
    }


    @PostMapping("/selectTwoAndThreeType")
    @ApiOperation(value = "夏季水果界面,类目展示二三级分类")
    @ApiImplicitParam(name = "id",value = "一级分类",dataType = "Long")
    public Map<String, Object> selectFruitByType(Long id) {

        JsonResult jsonResult = new JsonResult();
        jsonResult.setField("data","这是一个假数据");
        return jsonResult.getMap();
    }

    @PostMapping("/selectFruit")
    @ApiOperation(value = "夏季水果界面,类目选好分类后确定")
    @ApiImplicitParam(name = "id",value = "分类的id",dataType = "Long")
    public Map<String, Object> selectFruit(Long id) {
        JsonResult jsonResult = new JsonResult();
        jsonResult.setField("data","这是一个假数据");
        return jsonResult.getMap();
    }


}
